using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
using DevExpress.Persistent.Validation;
namespace Ascent.QiPei.Module.BusinessObjects.Finance
{
  [DefaultClassOptions]
  [DevExpress.Persistent.Base.NavigationItemAttribute("财务管理")]
  [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("收支帐")]
  public partial class InOutAccount : DevExpress.Persistent.BaseImpl.BaseObject
  {
    private System.String _remark;
    private System.String _pay;
    private System.String _income;
    private Ascent.QiPei.Module.BusinessObjects.Base.InOutAccountType _inOutAccountType;
    private System.String _summary;
    private System.String _date;
    public InOutAccount(DevExpress.Xpo.Session session)
      : base(session)
    {
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("日期")]
    [RuleRequiredField(DefaultContexts.Save)]
    public System.String Date
    {
      get
      {
        return _date;
      }
      set
      {
        SetPropertyValue("Date", ref _date, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("帐务类型")]
    [RuleRequiredField(DefaultContexts.Save)]
    public Ascent.QiPei.Module.BusinessObjects.Base.InOutAccountType InOutAccountType
    {
      get
      {
        return _inOutAccountType;
      }
      set
      {
          SetPropertyValue("InOutAccountType", ref _inOutAccountType, value);
        //if (_inOutAccountType == value)
        //  return;
        //Ascent.QiPei.Module.BusinessObjects.Base.InOutAccountType prevInOutAccountType = _inOutAccountType;
        //_inOutAccountType = value;
        //if (IsLoading)
        //  return;
        //if (prevInOutAccountType != null && prevInOutAccountType.InOutAccount == this)
        //  prevInOutAccountType.InOutAccount = null;
        //if (_inOutAccountType != null)
        //  _inOutAccountType.InOutAccount = this;
        //OnChanged("InOutAccountType");
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("摘要")]
    public System.String Summary
    {
      get
      {
        return _summary;
      }
      set
      {
        SetPropertyValue("Summary", ref _summary, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("收入")]
    public System.String Income
    {
      get
      {
        return _income;
      }
      set
      {
        SetPropertyValue("Income", ref _income, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("支出")]
    public System.String Pay
    {
      get
      {
        return _pay;
      }
      set
      {
        SetPropertyValue("Pay", ref _pay, value);
      }
    }
    [DevExpress.ExpressApp.DC.XafDisplayNameAttribute("备注")]
    public System.String Remark
    {
      get
      {
        return _remark;
      }
      set
      {
        SetPropertyValue("Remark", ref _remark, value);
      }
    }
  }
}
